<%= render 'spree/admin/shared/developers_nav' %>

<% content_for :page_actions do %>
  <%= button_link_to Spree.t('admin.webhooks_subscribers.new_webhooks_subscriber'), new_object_url, class: "btn-primary", icon: 'add.svg', id: 'admin_new_webhooks_subscriber_link' %>
<% end if can?(:create, Spree::Webhooks::Subscriber) %>
<% if @webhooks_subscribers.any? %>
  <div class="border rounded bg-white">
    <table class="table">
      <thead class="text-muted">
        <tr>
          <th><%= Spree.t('admin.url') %></th>
          <th><%= Spree.t('admin.active') %></th>
          <th><%= Spree.t('admin.webhooks_subscribers.subscriptions') %></th>
          <th><%= Spree.t('admin.webhooks_subscribers.time_of_last_event') %></th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <%= render partial: 'spree/admin/webhooks_subscribers/webhooks_subscriber', collection: @webhooks_subscribers, cached: spree_base_cache_scope %>
      </tbody>
    </table>
  </div>
  <%= render 'spree/admin/shared/index_table_options', collection: @webhooks_subscribers, simple: true %>
<% else %>
  <%= render 'spree/admin/shared/no_resource_found' %>
<% end %>
